Non-Volatile Memory (NVM) provides an intermediate alternative between high-performance Dynamic Random Access Memory (DRAM) and cost-effective hard disk drives (HDDs). Generally, the read performance of NVM is similar to DRAM and the write performance of NVM is significantly faster than HDDs. Moreover, NVM is byte-addressable and writes to NVM are durable, so data stored therein may be accessed directly after a crash and restart, as opposed to reloading such data from HDD into DRAM.
Traditionally, data is stored in DRAM in a tree format including a root node and leaves, with DRAM pointers to downstream leaves. To persist the data, the data is written to HDD in the same format. Specifically, the root node and leaves are written into a persistence file as separate binary chunks, with their pointers changed to account for offsets of bunches of leaves which point to the start of a new data block. A similar format may be used to persist the data in NVM. As a result of this persistence format, the time required to load persisted data into DRAM is dependent on the volume of persisted data.
NVM has been considered as a medium to persist database tables. In some implementations, each database table partition includes a delta column fragment and a main column fragment for each of its table columns. A main column fragment may include a column vector, a dictionary and, optionally, an index from dictionary value IDs to positions of the column vector storing each ID. It is desirable to persist the structures of main column fragments in and load these structures from NVM while addressing the shortcomings of conventional persistence methods.